<template>
    <div class="proRight">
        <TabNav @transferTab="getCmponentName" :subNav="subnav"></TabNav>
        <div class="tableInfor">
            <div :is="item.components" v-show="index==Current_seclected"  :text="item.text" :key="item.id" v-for="(item,index) in tabList" :proid="item.dataId" :subNav="subnav"></div>
        </div>
    </div>
</template>
<script>
    import TabNav from '@/components/public/tabNav'
    import JournalProDefault from '@/components/journal/journal_pro_default'
    import JournalProDetails from '@/components/journal/journal_pro_details'
    export default {
        data(){
            return{
                tabList:'',
                componentName:'JournalProDefault',
                cur:0,
            }
        },
        props:['subnav'],
        computed:{
            TabList(){
                return this.$store.state.journal.tabList;
            },
            Current_seclected(){
                return this.$store.state.journal.curSeclected
            },
        },
        methods:{
            getCmponentName(item,num){
                this.componentName = item;
            }
        },
        mounted(){
            let self = this;
            self.tabList = self.TabList;
        },
        components:{
            TabNav,
            JournalProDefault,
            JournalProDetails,
        }
    }
</script>
